package cn.tedu.oop;

public class Test2_Constructor2 {
    public static void main(String[] args) {
        Student2 s = new Student2("钟南山", 85);

        System.out.println(s.getName());
        System.out.println(s.getAge());
    }
}
class Student2{
    private String name;
    private int age;

    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }

    public Student2(){}

    public Student2(String a, int b){
        name = a;
        age = b;
    }
}